<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/6/28 0028
  Time: 15:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
        <!-- 全屏 -->
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <!-- 上方栏显示 -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
        <!-- 不自动识别号码 -->
        <meta name="format-detection" content="telephone=no">
        <link href="${ctx}/assets/public_skin/css/reset.css" rel="stylesheet">
        <link href="${ctx}/assets/public_skin/css/shop_style.css" rel="stylesheet">
        <script src="${ctx}/assets/public_skin/js/jquery-1.11.1.min.js" type="text/javascript"></script>
        <script src="${ctx}/assets/public_skin/js/shop.common.js" type="text/javascript"></script>
        <script src="${ctx}/assets/public_skin/js/jquery.touchSlider.js " type="text/javascript"></script>
        <title>首页</title>
        <script>
            //方法启用
            $(function(){
                $.Dashenslider(".main_visual",".main_image",".flicking_con a","#btn_prev","#btn_next","on",5000);//首页幻灯片
                $.Dashentab(".tab_menu .mt","span",".tab_menu .mc",".item","curr","click",0);
            })
        </script>
</head>
<body>
<header>
    <h1 class="new_logo">${shop.shopName}的微店</h1>
</header>
<div class="viewports">
    <article>
        <!--star 首页幻灯片-->

        <div class="main_visual">

            <div class="flicking_con">
                <c:forEach var="item" items="${wxShopBannerList}">
                    <a href="#"></a>
                </c:forEach>
            </div>

                <div class="main_image">
                    <ul>
                        <c:forEach var="item" items="${wxShopBannerList}">
                        <li><a href="javascript:;"><span style="background-image:url(${item.image});"></span></a></li>
                        </c:forEach>
                    </ul>
                    <a href="javascript:;" class="slide-btn" id="btn_prev"></a>
                    <a href="javascript:;" class="slide-btn" id="btn_next"></a>
                </div>
        </div>
        <!--end 首页幻灯片-->
        <div class="nav_class mt15 pt20">
            <div class="layout-box fs20">
                <a class="box-col hover" href="${ctx}/home"><img src="${ctx}/assets/public_skin/images/ico-home.png" alt="">
                    <p>店铺首页</p></a>
                <a class="box-col" href="#"><img src="${ctx}/assets/public_skin/images/ico-all.png" alt="">
                    <p>全部商品</p></a>
                <a class="box-col" href="${ctx}/${shopId}/list"><img src="${ctx}/assets/public_skin/images/ico-class.png" alt="">
                    <p>所有分类</p></a>
                <c:if test="${isSeller==0}">
                    <a class="box-col" href="${ctx}/shopping/myShoppingCart?sid=${shop.shopId}"><img src="${ctx}/assets/public_skin/images/ico-buy.png" alt="">
                        <p>购物车</p></a>
                </c:if>
                <c:if test="${isSeller==1}">
                    <a class="box-col" href="#"><img src="${ctx}/assets/public_skin/images/ico-buy.png" alt="">
                        <p>购物车</p></a>
                </c:if>

                <a class="box-col" href="${ctx}/my"><img src="${ctx}/assets/public_skin/images/ico-member.png" alt="">
                    <p>会员中心</p></a>
            </div>
        </div>
        <!--star 今日新品-->
        <div class="mtcBox mt15 b-ffffff">
            <div class="mt ptb20"><span class="pl20 c-cb1448">店铺推荐</span></div>
            <div class="mc plr20">
                <c:forEach var="item" items="${pProductList}">
                    <ul class="news_product_list">
                        <li>
                            <a href="${ctx}/goods/getGoodsInformation?pid=${item.productId}">
                                <div class="t_img odr">
                                    <img height="120px" src="${item.productMainImage}">
                                    <span class="pire b-ff0000 r10">￥${item.salePrice}</span>
                                </div>
                                <div class="t_info">
                                    <div class="name">${item.productName}</div>
                                </div>
                            </a>
                        </li>
                    </ul>
                </c:forEach>
            </div>
        </div>
        <!--end 今日新品-->
        <!--star 热卖商品-->
        <div class="mtcBox mt15">
            <div class="mt ptb20 tac">
                <span class="tit b-f1f1f1 plr30">热卖商品</span>
                <div class="brc"></div>
            </div>
            <div class="mc plr10">
                <c:forEach var="item" items="${saleCountTotal}">
                    <ul class="product_list_item">
                        <li>
                            <a href="${ctx}/goods/getGoodsInformation?pid=${item.productId}">
                                <div class="t_img"><img height="120px" src="${item.productMainImage}"></div>
                                <div class="t_info">
                                    <div class="name c6">${item.productName}</div>
                                    <div class="pire c-cb1448">￥${item.marketPrice}</div>
                                </div>
                            </a>
                        </li>
                    </ul>
                </c:forEach>
            </div>
        </div>
        <!--end 热卖商品-->
    </article>
    <footer class="footer tac mt10 ptb20">
        <div class="layout-box hgt_70">
            <c:if test="${shopByUserIdentity==1}">
                <a href="${ctx}/wx/shop" class="box-col"><i class="kaitong"></i>开通微店</a>
            </c:if>
            <c:if test="${userAgentByUserIdentity==2}">
                <a href="${ctx}/user/agent_application" class="box-col"><i class="dailishang"></i>成为代理商</a>
            </c:if>
        </div>
        <p class="ca pt10">2008-2016@联城国际提供微店技术服务</p>
    </footer>
</div>
</body>
</html>
